# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kgeography
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="https://edu.kde.org/kgeography"
pkgdesc="Geography Trainer"
license="GPL-2.0-or-later"
makedepends="extra-cmake-modules qt5-qtbase-dev kxmlgui-dev kwidgetsaddons-dev kcoreaddons-dev kconfigwidgets-dev ki18n-dev kitemviews-dev kiconthemes-dev kcrash-dev kdoctools-dev"
source="https://download.kde.org/stable/release-service/$pkgver/src/kgeography-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # No tests

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="b5921fcba4fb2e72a78adad91bc0886818cf473b4c5ebba6d42496205ef76284836a9d71d283514add3cb75a7ce5970b23a62fb08c8444490302368dfe7bf7d5  kgeography-20.04.3.tar.xz"
